<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">
<ui:composition>
	<h:panelGrid style="margin: 0 auto;">
	
		<h:form id="buscaGrafico">
			<h:messages />
			<h:inputHidden  />
			<h:panelGrid columns="10">
			<h:outputLabel value="Ação 1" for="acao1" />
				<h:inputText id="acao1" value ="#{yahooBean.acao1}" required="true" maxlength="15" size="10" />
				<!-- <script>
				function teste(){
				var i = document.getElementById("acao1").value;
				alert(i);
				}
				</script>-->
				<h:outputLabel value="Ação 2" for="acao2" />
				<h:inputText id="acao2"  maxlength="15" size="10" />
				<h:outputLabel value="Ação 3" for="acao3" />
				<h:inputText id="acao3"  required="false" size="10" maxlenght="15"/>
				 <h:outputLabel value="Tipo Gráfico" for="tipo" />
				 <h:selectOneMenu id="tipo"
					value="#{yahooBean.tipo}">
					<f:selectItem itemValue="l" itemLabel="Linhas" />
					<f:selectItem itemValue="b" itemLabel="Barras" />
					<f:selectItem itemValue="c" itemLabel="Candles" />
				</h:selectOneMenu> 
				<p:commandButton value="Carregar" onclick="confirmation.show()"/>
				<p:confirmDialog zindex="999" message="Deseja carregar novo gráfico?" header="Pergunta" severity="info" widgetVar="confirmation">
        			<p:commandButton value="Sim" update="graficosAcao" oncomplete="confirmation.hide()" actionListener="#{yahooBean.changeURL}" />  
        			<p:commandButton value="Não" onclick="confirmation.hide()" type="button" />  
				</p:confirmDialog>	
						
			
								
				
			</h:panelGrid>
		</h:form>
	</h:panelGrid>
</ui:composition>
</html>
